
#include <stdio.h>
#include <uf.h>
#include <uf_draw.h>

/* ARGSUSED */
void ufusr(char *param, int *retcod, int param_len)
{
    int ifail = 0;
    tag_t drawing_tag, new_drawing_tag;
    char error_message[MAX_LINE_SIZE + 1];
    char drawing_name[MAX_ENTITY_NAME_SIZE] = "SUCCESS";
    UF_DRAW_info_t drawing_info;


	UF_DRAW_metric_size_e drawsize;
	drawsize = UF_DRAW_A0;

   	UF_DRAW_size_union_u drawunion;
	 drawunion.metric_size_code = drawsize;

	 drawing_info.size_state = UF_DRAW_METRIC_SIZE;
	 drawing_info.size = drawunion;
	 drawing_info.drawing_scale = 1;
	 drawing_info.units =  1;
	 drawing_info.projection_angle = UF_DRAW_FIRST_ANGLE_PROJECTION;

    ifail = UF_initialize();
   
    if( !ifail )
        ifail = UF_DRAW_create_drawing( drawing_name, &drawing_info,   &new_drawing_tag);

	if( !ifail )
				ifail = UF_DRAW_ask_drawing_info( drawing_tag, &drawing_info );
    /* Open the new drawing. */
    if( !ifail )
        ifail = UF_DRAW_open_drawing( new_drawing_tag );

       ifail = UF_terminate();
}
